<section class="blog_entry">
	<h2 class="outline_header">Blog Entry</h2>
	<?php

if( isset($latest_post->title)) {

	?>

	<article>
		<h2><?php echo $latest_post -> title;?></h2>
		<?php
		$unix = mysql_to_unix($latest_post -> date_published);
		$human_date = unix_to_human($unix);
		?>

		<abbr class="date time published" title="<?php echo $human_date;?>"> <?php echo $human_date;?></abbr>
		<?php echo $latest_post -> article;?>
		<div class="additional_info">
			<?php

			$image_properties = array('src' => 'post_images/' . $latest_post -> file, 'alt' => $latest_post -> title, 'width' => '650', 'height' => '200', 'title' => $latest_post -> title);

			echo img($image_properties);
			?>
		</div>
	</article>
	<aside class="comments">
		<h2 class="outline_header">Related Comments</h2>
		<?php

if(isset($related_comments) && count($related_comments)>0)
{
		?>
		<ul>
			<?php foreach ($related_comments as $comment) {
			?>
			<li id="comment<?php echo $comment['id']; ?>">
				<h3><?php echo $comment['name'];?> Says:</h3>
				<abbr class="date time published" title="2011-12-01T17:38:58+0900"> <?php

				$unix = mysql_to_unix($comment['date']);
				echo unix_to_human($unix);
					?></abbr>
				<p>
					<?php echo $comment['comment']
					?>
				</p>
			</li>
			<?php }?>
		</ul>
		<?php

		}

		else{
		?>
		<p  style="padding-left: 10px">
			there are no comments for the moment ....
		</p>
		<?php
		}
		?>

		<?php

		$hidden = array('post_id' => $latest_post -> id, 'enabled' => 1);
		echo form_open("blog/add_comment/", "", $hidden);
		?>
		<fieldset>
		<p>
			<label for="name">Name <em> // required</em></label>
			<br>
			<input id="name" name="name" placeholder="your name..." type="text" required />
		</p>
		<p>
			<label for="from">Your email address <em> // required</em></label>
			<br>
			<input id="email" name="email"  placeholder="your email address..." type="email" required>
		</p>
		<p>
			<label for="website">Website</label>
			<br>
			<input id="website" name="website"  placeholder="website..." type="url">
		</p>
		<p>
			<label for="comment">Comment <em> // required</em></label>
			<br>
			<textarea name="comment"  cols="35"  rows="10"  required></textarea>
		</p>
		<p>
			<input type="reset" value="Clear" style="width: 35%" />
			<input type="submit" value="Send your message" style="width: 35%" />
		</p>
		</fieldset> <?php
		echo form_close();
		?>
	</aside>
	<?php } else{?>

	<blockquote class="sorry">
		<h3>I'm so sorry</h3>
		<p>
			So far I have not written anything...
		</p>
	</blockquote>
	<?php }?>
</section>
<?php $this -> load -> view('public/contact/sidebar');?>